// addition 波波老师的怎样实现绝对公平的洗牌算法
function xipai(arr) {
  let length = arr.length
  let temp
  for (let i = 0; i < length; i++) {
    index = Math.floor(Math.random() * length)
    temp = arr[index]
    arr[index] = arr[i]
    arr[i] = temp
  }
  console.log(arr)
  console.log(arr.length);
}

let array = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A', '小王', '大王']
xipai(array)
